
const routes = [
    {
        path: '/',
        components:{
            FrameLeft: HomeLeft ,
            FrameBody: HomeBody
        }

    },
    {
        path: '/fileTool',
        components:{
            FrameLeft:FileToolLeft,
            FrameBody:FileToolBody
        },
        children:[
            {
                path:'pdfToWord',
                components: {
                    FileTool:PdfToWorldBody
                }
            },
            {
                path:'pdfToWordByImage',
                components: {
                    FileTool:PdfToWorldByImageBody
                }
            }

        ]
    },
    {
        path: '/code-generator',
        redirect: '/code-generator/mysql', //默认加载子路由
        components:{
            FrameLeft:DBLeft,
            FrameBody:DBBody
        },
        children:[
            {
                path:'mysql',
                redirect:'/code-generator/mysql/mysqlCodeGenerator', //默认加载子路由
                components: {
                    DBTool:MysqlBody
                },
                children:[
                    {
                        path:'mysqlCodeGenerator', //  /code-generator/mysql/mysqlCodeGenerator
                        redirect:'/code-generator/mysql/mysqlCodeGenerator/mybatisCodeGenerator', //默认加载子路由
                        components: {
                            MysqlBody:MysqlCodeGeneratorBody
                        },
                        children:[
                            {
                                path:'mybatisCodeGenerator', //  /code-generator/mysql/mysqlCodeGenerator/mybatisCodeGenerator
                                components: {
                                    MysqlBodyRight:MybatisCodeGeneratorBody
                                }
                            },
                            {
                                path:'mybatisPlusCodeGenerator', //  /code-generator/mysql/mysqlCodeGenerator/mybatisPlusCodeGenerator
                                components: {
                                    MysqlBodyRight:MybatisPlusCodeGeneratorBody
                                }
                            }
                        ]
                    }
                ]
            }

        ]
    },
    {
        path: '/timer',
        components:{
            FrameLeft: TimerLeft ,
            FrameBody: TimerBody
        }

    },
    {
        path: '/empty',
        components:{
            FrameLeft: emptyLeftPage ,
            FrameBody: emptyBodyPage
        }

    }
]
// 3. 创建路由实例并传递 `routes` 配置
// 你可以在这里输入更多的配置，但我们在这里
// 暂时保持简单
const router = createRouter({
    // 4. 内部提供了 history 模式的实现。为了简单起见，我们在这里使用 hash 模式。
    history: VueRouter.createWebHashHistory(),
    routes, // `routes: routes` 的缩写
})